﻿@model ProjectInspectStartModel
@{
    ViewBag.Title = "开始报检";
}
@section JS
{
    <script type="text/javascript">
        $(document).ready(function () {
            $('form').validate({
                rules: {
                    EquipmentNO: 'required'
                },
                messages: {
                    EquipmentNO: '设备编号不能为空'
                }
            });
            $("#EquipmentNO").autocomplete({
                source: "/Equipment/Suggestion",
                minLength: 1,
                select: function (event, ui) {
                    $('#EquipmentNO').val(ui.item.label);
                    return false;
                },
                focus: function (event, ui) {
                    $('#EquipmentNO').val(ui.item.label);
                    return false;
                }
            });
        });

        
    </script>
}
@section BodyNav
{
    > @Html.ActionLink("工程列表", "List", "Project") > 开始报检
}
@using (Html.BeginForm())
{
    <table class="window">
        <tr class="head">
            <th colspan="2">
                开始报检
            </th>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(m => m.EquipmentNO)
            </th>
            <td>@Html.EditorFor(m => m.EquipmentNO)
                @Html.ValidationMessageFor(m => m.EquipmentNO)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="确定" class="btnBtn" />
                @Html.ActionLink("设备查询", "Search", "Equipment", null, new { @class = "lnkBtn" })
            </td>
        </tr>
    </table>
    
    
}